#include<iostream>
#define N 100000100
int n, m;
int a[N];
int main()
{
    std::ios::sync_with_stdio(false);
    std::cin.tie(0);
    std::cin >> n >> m;
    for(int i = 1; i <= n; i++)
        std::cin >> a[i];
    int sum = 0;
    int ansl = 1, ansr = n;
    int l = 1, r = 0;
    while(l <= n)
    {
        while(r <= n&&sum < m)
        {
            sum += a[++r];
        }
    if(r > n)
        break;
    if(r - l < ansr - ansl)
    {
        ansr = r;
        ansl = l;
    }
    sum -= a[l++];
    }
    std::cout << ansl << " " << ansr << std::endl;
    return 0;
}
